using Microsoft.Phone.Controls.Maps.Core;
using System;
namespace Microsoft.Phone.Controls.Maps.Overlays
{
	public class ZoomMapCommand : MapCommandBase
	{
		private readonly bool zoomIn;
		public ZoomMapCommand(bool zoomIn)
		{
			this.zoomIn = zoomIn;
		}
		public override void Execute(MapBase map)
		{
			if (this.zoomIn)
			{
				map.ZoomLevel = Math.Round(map.ZoomLevel + 1.0);
				return;
			}
			map.ZoomLevel = Math.Round(map.ZoomLevel - 1.0);
		}
	}
}
